﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.Composition;
using Core.Interfaces;
using Core.Common;
using Core.BusinessLogic.Interfaces;
using SonCa.SocialNetwork.Web.ASCX.IPresenters;
using Core.DataAccess;

namespace SonCa.SocialNetwork.Web.ASCX.Presenters
{
    public class UploadZonePresenter
    {
        private IUploadZonePresenter _view;
        [Import]
        private IUserSession _userSession;
        [Import]
        private IStatusUpdateService _statusUpdateService;

        public UploadZonePresenter(IUploadZonePresenter view)
        {
            _view = view;
            MEFManager.Compose(this);
        }

        public void SaveStatus()
        {
            _statusUpdateService.SaveStatusUpdate(new StatusUpdate { CreateDate = DateTime.Now, AccountID = _userSession.CurrentUser.AccountID, Status = _view.StatusContent });
        }

    }
}